package nuc.sw.entity;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.springframework.stereotype.Component;
@Entity
@Table(name="t_user")
@SequenceGenerator(sequenceName="user_seq",name="user_seq",initialValue=1)
@Component("user")
public class User {
	private int id;
	private String name;
	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="user_seq")
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Override
	public String toString() {
		return "User [id=" + id + ", name=" + name + "]";
	}
	
}